﻿//  -------------------- iSharePoint -------------------- //
// 
//  Company:	IT Complex, LLC
//  Project:	Smart.Common
//  File name:	TemplateFormatter.cs
//  Developer:	Solomatov Igor
//  Created:	15.04.2012
// 
//  -------------------- iSharePoint -------------------- //

namespace Smart.Common.Templates
{
	/// <summary>
	/// Template formatter (creates new Instance using Template and update values)
	/// </summary>
	public abstract class TemplateFormatter
	{
		/// <summary>
		/// Template context
		/// </summary>
		public TemplateCtx Ctx { get; set; }

		/// <summary>
		/// Template formatter (creates new Instance using Template and update values)
		/// </summary>
		protected TemplateFormatter(TemplateCtx ctx)
		{
			Ctx = ctx;
		}

		/// <summary>
		/// Format template
		/// </summary>
		public abstract bool Format();

		/// <summary>
		/// Format template
		/// </summary>
		public abstract object Format(object templateData);
	}
}